<?php
$this->load->view("header");
?>
<div id="main_content">
<div class="top_margin"></div>

<?php
$this->load->view("rank/rank_leftcolumn");
?>

<div class="homepage_mid_column">
<div class="chart_listing_dir" style="border-left:1px solid #bcd2ea; margin-top:10px;width:600px">
<div class="book_chart_title">最新出售</div>
<table class="chart_listing_preview">
<tbody>
<?php
if($recent_salepost==null){
  echo "暂时没有人出售二手书。";
}
else{
  foreach($recent_salepost as $salepost){?>
  <table id="book_item" cellspacing="0" cellpadding="0" class="BookItem" onmouseover="this.style.background = &quot;#f2f3f4&quot;;" onmouseout="this.style.background = &quot;#ffffff&quot;;" >
  <tbody>
  <tr class="tr-margin"><td></tr>
  <tr>
    <td valign="top" align="left">
        <table class="BookInfo" cellspacing="0" cellpadding="0" width="100&percnt;">
        <tbody><tr><td class="title"  align="left" style="font-size:13px"><a href="<?=site_url()?>/post/salepost_detail?userid=<?=$salepost->user_id?>&bookid=<?=$salepost->book_id?>"><?=$salepost->book_title?></a></td></tr>
        <tr><td class="tracks" colspan="10" align="left" style="font-size:12px">店主：<a href="<?=site_url()?>/bookiki/enterShop?id=<?=$salepost->user_id?>&go=yes" name="landingpagelink"><?=$salepost->user_id?></a>&nbsp;&nbsp;要价:￥<?=$salepost->price?>&nbsp;&nbsp;&nbsp;成色:<?php switch($salepost->quality) {case 1: echo "较旧";break; case 2: echo "半新";break; case 3: echo "基本全新";break; case 4: echo "全新";break; }?>
         <?php $content=urlencode($salepost->book_title);
                   $receiver=urlencode($salepost->user_id);
        ?>
        <a href="<?=site_url()?>/user/edit_msg?content=<?=$content?>&type=wanted&receiver=<?=$receiver?>&go=yes">站短</a>
         </td></tr>
         </tbody></table>
    </td>
   </tr>
   </tbody>
   </table>

<?php
 } ?>
<div class="pagination">
    <?php echo $this->mypagination->create_links();?>
</div>
<?php
} //end of else
?>
</tbody>
</table>
</div><!--book_charts中间偏左的排行榜-->
</div>  <!--homepage_mid_column-->


<?php
$this->load->view("bookiki/rightcolumn");
?>

<?php
$this->load->view("footer2");
?>